<%-- 
    Document   : header
    Created on : 2011-9-17, 10:49:42
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        
        <script type="text/javascript" src="header.js"></script>
        <style type="text/css">
            <!--
            <%--  body {
                  background-color: #C2E0FA;
                  background-image: url("../../image/login/loginback1.jpg");
                  background-repeat: repeat;
              } --%>

            #Layer1 {
                position:absolute;
                left:64px;
                top:154px;
                width:108px;
                height:109px;
                z-index:1;
            }
            #Layer2 {
                position:absolute;
                left:126px;
                top:2px;
                width:0px;
                height:13px;
                z-index:2;
            }
            #Layer3 {
                position:absolute;
                left:126px;
                top:9px;
                width:0px;
                height:6px;
                z-index:3;
            }
            #Layer4 {
                position:absolute;
                left:3px;
                top:1px;
                width:773px;
                height:102px;
                z-index:4;
            }
            #Layer5 {
                position:absolute;
                left:10px;
                top:5px;    
                width:84px;
                height:88px;
                z-index:5;
            }
            #Layer6 {
                position:absolute;
                left:120px;
                top:-25px;
                width:800px;
                height:60px;
                z-index:6;
            }
            .STYLE1 {
                font-weight: bold;
                font-family: "黑体";
                color: #191970;
                font-size: 48px;
                text-shadow: 1px 1px rgba(197, 223, 248,0.8),
                    2px 2px rgba(197, 223, 248,0.8),
                    3px 3px rgba(197, 223, 248,0.8),
                    4px 4px rgba(197, 223, 248,0.8);
            }
            #Layer7 {
                position:absolute;
                left:344px;
                top:64px;
                width:355px;
                height:29px;
                z-index:7;
            }
            .STYLE9 {
                font-size: 45px;
                letter-spacing: 30px;
                font-family: "隶书";
                color: #191970;
                font-weight: bold;
                text-shadow: 1px 1px rgba(197, 223, 248,0.8),
                    2px 2px rgba(197, 223, 248,0.8),
                    3px 3px rgba(197, 223, 248,0.8),
                    4px 4px rgba(197, 223, 248,0.8);
            }
            .STYLE11 {
                font-family: Arial, Helvetica, sans-serif;
                color: #191970;
                font-size: 16px;
                font-weight: bold;
            }
            #Layer8 {
                position:absolute;
                left:717px;
                top:62px;
                width:398px;
                height:18px;
                z-index:8;
            }
            .STYLE13 {
                font-size: 14px;
                font-family: "宋体";
                color: #0066FF;
            }
            a:link {
                color: #3344CC;
            }
            a:hover{ color:#FF0000;}
            .STYLE14 {
                color: #00CCFF;
                font-family: "新宋体";
                font-size: 14px;
            }
            .STYLE15 {color: #0066FF}
            #Layer9 {
                position:absolute;
                left:22px;
                top:5px;
                width:183px;
                height:58px;
                z-index:9;
            }
            .STYLE16 {
                font-size: 14px;
                color: #0000FF;
            }
            .STYLE18 {color: #0000FF}
            -->

            div.menu{   
                font-weight: bold;
                position:absolute;
                right:50px;
                top:50px;
                z-index:100;
            }
            div.menu ul
            {
                list-style:none; /* 去掉ul前面的符号 */
                margin: 0px; /* 与外界元素的距离为0 */
                padding: 0px; /* 与内部元素的距离为0 */
                width: auto; /* 宽度根据元素内容调整 */
            }
            /* 所有class为menu的div中的ul中的li样式 */
            div.menu ul li
            {
                float:left; /* 向左漂移，将竖排变为横排 */
            }
            /* 所有class为menu的div中的ul中的a样式(包括尚未点击的和点击过的样式) */
            div.menu ul li a, div.menu ul li a:visited
            {
                background-color: #465c71; /* 背景色 */
                border: 1px #4e667d solid; /* 边框 */
                color: #dde4ec; /* 文字颜色 */
                display: block; /* 此元素将显示为块级元素，此元素前后会带有换行符 */
                line-height: 1.35em; /* 行高 */
                padding: 4px 20px; /* 内部填充的距离 */
                text-decoration: none; /* 不显示超链接下划线 */
                white-space: nowrap; /* 对于文本内的空白处，不会换行，文本会在在同一行上继续，直到遇到 <br> 标签为止。 */
            }
            /* 所有class为menu的div中的ul中的a样式(鼠标移动到元素中的样式) */
            div.menu ul li a:hover
            {
                background-color: #bfcbd6; /* 背景色 */
                color: #465c71; /* 文字颜色 */
                text-decoration: none; /* 不显示超链接下划线 */
            }
            /* 所有class为menu的div中的ul中的a样式(鼠标点击元素时的样式) */
            div.menu ul li a:active
            {
                background-color: #465c71; /* 背景色 */
                color: #cfdbe6; /* 文字颜色 */
                text-decoration: none; /* 不显示超链接下划线 */
            }

            div.menuuser{
                font-weight: bold;
                position:absolute;
                right:40px;
                top:5px;
                z-index:99;
            }
            div.menuuser ul
            {
                list-style:none; /* 去掉ul前面的符号 */
                margin: 0px; /* 与外界元素的距离为0 */
                padding: 0px; /* 与内部元素的距离为0 */
                width: auto; /* 宽度根据元素内容调整 */
            }
            /* 所有class为menu的div中的ul中的li样式 */
            div.menuuser ul li
            {
                color: #465c71;
                margin:10px;padding:0px;
                float:left; /* 向左漂移，将竖排变为横排 */
            }
            div.headerdiv
            {
                position:absolute;
                left:500px;
                top:0px;
                width:90px;
                height:95px;
                z-index:5;
            }
        </style>

    </head>

    <body leftmargin="0" topmargin="0" rightmargin="0" topmargin="0">
        <img src="../../image/top/top1.jpg" width="100%" height="100%" style="position:absolute;top:0;left:0;right:100;bottom:500;z-index:-1">
        <div id="headerdiv" class="headerdiv">
            <div id="Layer5">
                <img src="../../image/login/bz.png" width="84" height="70" />
            </div>
            <div id="Layer6">
                <h1 class="STYLE9">电压监测管理系统</h1>
            </div>
        </div>
        <div class="menu">
            <ul>
                <li hidden="<%=session.getAttribute("userName").toString().equals("super")?"false":"true"%>"><a href="../util/SessionView.jsp" target="DataWindow"><span>Session</span></a></li>
                <li><a href="welcome.jsp"  target="DataWindow"><span>首页</span></a></li>
                <li><a href="#" onclick="changePassword()"><span>修改密码</span></a></li>
                <li><a href="../../servlet/home/LogoutServlet" target="_parent"><span onclick="window.parent.isLogout=true;">注销用户</span></a></li><%--javascript:window.parent.location='../../servlet/system/LoginsessionClear.java--%>
            </ul>
        </div>
        <%--id="Layer8"<span class="STYLE16"><a href="../jsp/util/SessionView.jsp" target="DataWindow">Session</a>&nbsp;&nbsp; |&nbsp;&nbsp;<a href="welcome.jsp"  target="DataWindow">首页</a>&nbsp;&nbsp; |&nbsp;&nbsp;<a href="javascript:window.parent.close();">修改密码</a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:window.parent.location='/DYJC5Web/index.jsp'">注销用户</a> </span> </div>--%>
        <div class="menuuser">
            <div>
                <ul>
                    <li>
                        <img src="../../image/icon/house_go.png" >
                        <%=session.getAttribute("currentOrgName").toString()%>
                    </li>
                    <li>
                        <img src="../../image/icon/user.png" >
                        <text id="RealName"><%=session.getAttribute("realName").toString()%></text>
                    </li>
                    <li>
                        <img src="../../image/icon/home.png" >
                        <%=session.getAttribute("companyName").toString()%>
                    </li>
                </ul>
                <%--id="Layer9"<p class="STYLE14">
                    <span class="STYLE15">
                    <img src="../../image/user/super.png" width="20" height="20">
                    <span class="STYLE18"> <%=session.getAttribute("companyName").toString()%></span></span>
                    <span class="STYLE15"><br class="STYLE13">
                    <img src="../../image/user/super.png" width="20" height="20"><span class="STYLE18"> <%=session.getAttribute("userName").toString()%></span></span></p>--%>
            </div>
        </div>

        <script type="text/javascript">
            <!--
            var winWidth = 0;
            var winHeight = 0;
            function findDimensions() //函数：获取尺寸
            {
                //获取窗口宽度
                if (window.innerWidth)
                    winWidth = window.innerWidth;
                else if ((document.body) && (document.body.clientWidth))
                    winWidth = document.body.clientWidth;
                //获取窗口高度
                if (window.innerHeight)
                    winHeight = window.innerHeight;
                else if ((document.body) && (document.body.clientHeight))
                    winHeight = document.body.clientHeight;
           
                //通过深入Document内部对body进行检测，获取窗口大小
                if (document.documentElement  && document.documentElement.clientHeight &&
                    document.documentElement.clientWidth)
                {
                    winHeight = document.documentElement.clientHeight;
                    winWidth = document.documentElement.clientWidth;
                }
                //结果输出至两个文本框
                if(winWidth < 1820){
                    if(winWidth>1320){
                        document.getElementById("headerdiv").style.left = "1px";
                        document.getElementById("headerdiv").style.display="";
                    }
                    if(winWidth<1320){
                        //document.getElementById("headerdiv").style.display="none";
                        document.getElementById("headerdiv").style.left = "1px";
                        document.getElementById("headerdiv").style.display="";
                    }
                }
                else{
                    
                        document.getElementById("headerdiv").style.left = "50px";
                        document.getElementById("headerdiv").style.display="";
                    
                }
                
            }
            findDimensions();                  //调用函数，获取数值
            window.onresize=findDimensions;
            //-->
        </script>
    </body>
</html>
